#pragma once
#include "stdafx.h"
#include "Monome.h"

using namespace std;

class Polynome
{
private:
	list<Monome> _monomes;
	void Ajouter (const Monome & m);

public:
	Polynome();
	Polynome(Monome & m);
	Polynome(Polynome & p);
	~Polynome(void);

	Polynome & operator= (const Polynome & p);
	Polynome operator+ (const Polynome & p) const;
	Polynome operator+ (const Monome & m) const;
	Polynome operator* (const Polynome & p) const;

	double eval(const double x) const;

	string ToString () const;

	unsigned GetTaille() const;
	Monome & GetMonome(const unsigned pos ) const;
};


std::ostream & operator<<(std::ostream & flot,const Polynome & p);